import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/index.vue'
import AddUser from '../pages/addUser.vue'
import Report from '../pages/report.vue'
import Recovery from '../pages/recovery.vue'
import Exam from '../pages/exam.vue'
import Attitude from '../pages/attitude.vue'
import ReportList from '../pages/reportList.vue'
import Userinfo from '../pages/userinfo.vue'
import Anli from '../pages/anli.vue'
import Message from '../pages/message.vue'
import Assessment from '../pages/assessment.vue'
import solutionChart from '../pages/solutionchart.vue'
import Programme from '../pages/programme.vue'
import Article from '../pages/article.vue'
import Level from '../pages/level.vue'
const  Category = () => import("../pages/category.vue")
Vue.use(VueRouter)
  const routes = [
  {
    path: '/',
    name: 'index',
    component: Home
  },
  {
    path: '/index',
    component: () => import(/* webpackChunkName: "index" */ '@/views/index.vue'),
  },
	{
	  path: '/questions',
	  component: () => import(/* webpackChunkName: "questions" */ '@/views/questions.vue')
	},
  {
    path: '/solution',
    component: () => import(/* webpackChunkName: "solution" */ '@/views/solution.vue'),
  },
  {
    path: '/action',
    component: () => import(/* webpackChunkName: "action" */ '@/views/action.vue')
  },
  {
    path: '/category',
    component: Category
  },
  {
    path: '/mine',
    component: () => import(/* webpackChunkName: "mine" */ '@/views/mine.vue')
  },
	{
		path: '/adduser',
		component: AddUser
	},
	{
		path: '/report',
		component: Report
	},
	{
		path: '/recovery',
		component: Recovery
	},
	{
		path: '/exam',
		component: Exam
	},
	{
		path: '/attitude',
		component: Attitude
	},
	{
		path: '/reportList',
		component: ReportList
	},
	{
		path: '/userinfo',
		component: Userinfo
	},
	{
		path: '/anli',
		component: Anli
	},
	{
		path: '/message',
		component: Message
	},
	{
		path: '/assessment',
		component: Assessment
	},
	{
		path: '/solutionChart',
		component: solutionChart,
		meta: {
			title: '解决方案'
		  }
	},
	{
		path: '/programme',
		component: Programme
	},
	{
		path: '/article',
		component: Article
	},
	{
		path: '/level',
		component: Level,
		meta: {
			title: '运动处方'
		  }
	}
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
